#include <stdio.h>

namespace sg
{
	class A
	{
		public :
			int p;
	};

	class B
	{
		public :
			int p;
	};
	
	class C : public A, public B
	{
		public :

//			void ShowP()
//			{
//				p = 100;
//				printf("%d",p);
//			}

			void ShowP()
			{
				A::p=100;
				printf("[A::p] %d\n",A::p);
			}
	};

	class Base 
	{
		public :
			void display(){printf("Base::display\n");}
	};

	class MidClass1 : virtual public Base
	//class MidClass1 : virtual public Base
	{};
	class MidClass2 : virtual public Base
	//class MidClass2 : public Base
	{};

	class Child : public MidClass1, public MidClass2
	{
		
	};
}

int main()
{
	sg::C c;
	c.ShowP();

	sg::Child child;
	child.display();

	return 0;
}
